Skip to main content

Delete Mail

AutomatR.ExchangeServer.Activities.DeleteMail

The "Delete Mail" activity in AutomatR is part of the Exchange Server activities package, providing the capability to delete an email message from the specified mailbox. This activity enhances automation workflows by facilitating the removal of unwanted or obsolete email messages.

Properties

NameDescription
Input
Mail MessageEnter the mail message to be deleted. Use the MailMessage variable containing the email message to be deleted.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow.
Optional
DelayEnter the wait time in seconds (e.g., 5) to start the activity.
Output
ResultOutputs the result of the "Delete Mail" operation, indicating whether the email message was successfully deleted. Boolean variable to store the operation result.

How to use:

  1. Drag and drop the "Delete Mail" activity onto the workflow.
  2. Configure the properties by specifying the mail message to be deleted.
  3. Optionally, customize the display name and set a delay if necessary.
  4. Execute the workflow to delete the specified email message from the mailbox.

Example: Consider an example where the "Delete Mail" activity is used to delete an email message with a specific message ID:

Delete Mail:
Display Name: "Delete Important Email"
Mail Message: importantMailMessage
Result: isDeleteSuccessful

In this example, the activity deletes the email message specified by the importantMailMessage variable. The result of the operation (success or failure) is stored in the Boolean variable "isDeleteSuccessful" for further handling in the workflow.